package com.example.healthcondition.entity;

import java.time.LocalDateTime;

public class ExerciseSuggestions {
    private Integer suggestion_id;
    private Integer user_id;
    private String suggestion_type;
    private String description;
    private LocalDateTime created_at;

    // 默认构造函数
    public ExerciseSuggestions() {
    }

    // 带所有属性的构造函数
    public ExerciseSuggestions(Integer suggestion_id, Integer user_id, String suggestion_type, String description, LocalDateTime created_at) {
        this.suggestion_id = suggestion_id;
        this.user_id = user_id;
        this.suggestion_type = suggestion_type;
        this.description = description;
        this.created_at = created_at;
    }

    // Getter和Setter方法
    public Integer getSuggestionId() {
        return suggestion_id;
    }

    public void setSuggestionId(Integer suggestion_id) {
        this.suggestion_id = suggestion_id;
    }

    public Integer getUserId() {
        return user_id;
    }

    public void setUserId(Integer user_id) {
        this.user_id = user_id;
    }

    public String getSuggestionType() {
        return suggestion_type;
    }

    public void setSuggestionType(String suggestion_type) {
        this.suggestion_type = suggestion_type;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public LocalDateTime getCreatedAt() {
        return created_at;
    }

    public void setCreatedAt(LocalDateTime created_at) {
        this.created_at = created_at;
    }

    // toString方法
    @Override
    public String toString() {
        return "ExerciseSuggestions{" +
                "suggestion_id=" + suggestion_id +
                ", user_id=" + user_id +
                ", suggestion_type='" + suggestion_type + '\'' +
                ", description='" + description + '\'' +
                ", created_at=" + created_at +
                '}';
    }

    // hashCode和equals方法
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ExerciseSuggestions that = (ExerciseSuggestions) o;
        return suggestion_id != null && suggestion_id.equals(that.suggestion_id);
    }

    @Override
    public int hashCode() {
        return suggestion_id != null ? suggestion_id.hashCode() : 0;
    }
}